/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const nestedRouter = {
  path: '/nested',
  component: Layout,
  redirect: 'noRedirect',
  name: 'Nested',
  meta: {
    title: '营销管理',
    icon: 'nested'
  },
  children: [
    {
      path: 'menu1',
      component: () => import('@/views/nested/menu1/index'), // Parent router-view
      name: 'Menu1',
      meta: { title: '订单管理' }
    },
    {
      path: 'sales',
      name: 'Menu2',
      component: () => import('@/views/sales/index'),
      meta: { title: '营销任务管理' },
      children: [
        {
          path: 'saleTask',
          component: () => import('@/views/sales/saleTask/index'),
          name: 'SaleTask',
          meta: { title: '营销任务' }
        },
        {
          path: 'saleDetail',
          name: 'saleDetail',
          component: () => import('@/views/sales/saleTask/detail'),
          meta: { title: '营销任务详情' },
          hidden: true
        }
      ]
    },
    {
      path: 'menu3',
      name: 'Menu2',
      component: () => import('@/views/sales/mySale/index'),
      meta: { title: '我的营销' }
    }
  ]
}

export default nestedRouter
